POV-Ray : Newsgroups : povray.binaries.images : -Another- RSOCP variation (217kB jpeg) : Re: -Another- RSOCP variation (217kB jpeg) Server Time
2 Aug 2024 20:22:20 EDT (-0400)
  Re: -Another- RSOCP variation (217kB jpeg)  
From: Rune
Date: 19 Jun 2007 10:21:20
Message: <4677e660$1@news.povray.org>
Thomas de Groot wrote:
> There is a nice little thing you can use easily:
>
> //before the camera definition:
> #local H=image_width/sqrt(image_height*image_width);
> #local V=image_height/sqrt(image_height*image_width);
> #local Iwidth = 500;
> #local Iheight = 600;
>
> //in the camera definition use:
> right    x*(Iwidth*M)/(Iheight*M)
>

> Ouch!! forgot
> #local M = 1;
> in the declaration. Not really essential though, but for completeness
> sake of this example.

I don't understand this. You declare H and V using a clever method, but then 
don't use those variables at all...

I'd simply say:

#local W = image_width/sqrt(image_height*image_width);
#local H = image_height/sqrt(image_height*image_width);

// in the camera definition use:
right    x*W
up y*H // or z*H if Z is up

Rune
-- 
http://runevision.com


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.